package com.violet.common.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
* @Author: wqf
* @Date: 2023/06/13
* @Description: 用户信息表
*/

@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "s_user")
public class User extends LogicSuperEntity<User>{
    /**
     * 账户名称
     */
    @Schema(description = "账户名称")
    private String username;
    /**
     * 用户密码
     */
    @Schema(description = "用户密码")
    private String password;
    /**
     * 账户状态  0-正常使用 1-已冻结 2-已注销
     */
    @Schema(description = "账户状态  0-正常使用 1-已冻结 2-已注销")
    private Integer status;
    /**
     * qq号码
     */
    @Schema(description = "qq号码")
    private String qq;
    /**
     * 邮箱账号
     */
    @Schema(description = "邮箱账号")
    private String email;
    /**
     * 手机号码
     */
    @Schema(description = "手机号码")
    private String phone;
    /**
     * 账户启用状态  0不启用 1-启用
     */
    @Schema(description = "账户启用状态 0不启用 1-启用")
    private Boolean enabled;

    /**
     * 角色权限集合
     */
    @TableField(exist = false)
    private List<Role> roles;
    /**
     * 角色id
     */
    @TableField(exist = false)
    private String roleId;
    /**
     * 旧密码
     */
    @TableField(exist = false)
    private String oldPassword;
    /**
     * 新密码
     */
    @TableField(exist = false)
    private String newPassword;
}